/* eslint-disable */
import echarts from "echarts";
import 'echarts/map/js/china.js';
import {
  getOption1,
  getOption2,
  getOption3,
  getOption4,
  getOption5
} from "./getOption";
import {
  getHotOption
} from "./getHotOption";

export default {
  data() {
    return {
      value: "",
      channel: 0,
      time: "",
      tableData: [
        {
          field1: 1,
          field2: "2222"
        },
        {
          field1: 2,
          field2: "2222"
        },
        {
          field1: 3,
          field2: "2222"
        }
      ]
    };
  },

  mounted() {
    this.initEcharts();
  },
  methods: {
    initEcharts() {
      let echart1 = echarts.init(this.$refs.echartDiv1);
      echart1.setOption(getOption1());

      let echart2 = echarts.init(this.$refs.echartDiv2);
      echart2.setOption(getOption2());

      let echart3 = echarts.init(this.$refs.echartDiv3);
      echart3.setOption(getOption3());

      let echart4 = echarts.init(this.$refs.echartDiv4);
      echart4.setOption(getOption4());

      let echart5 = echarts.init(this.$refs.echartDiv5);
      echart5.setOption(getHotOption());

      setTimeout(() => {
        echart5.resize()
      }, 500);
    }
  }
};